﻿using System.Data;
using System;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IFamily
    {
        [OperationContract]
        DataSet Family_GetAll();

        [OperationContract]
        DataSet Family_GetList(out int ItemCount, int currentPage, int pageSize);

        [OperationContract]
        FamilyInfo Family_GetInfo(int FamilyID);

        [OperationContract]
        DataSet Family_GetWithEmployee(int EmployeeID);

        [OperationContract]
        DataSet Family_GetWithEmployee1(int EmployeeID);

        [OperationContract]
        int Family_Insert(FamilyInfo eInfo);

        [OperationContract]
        bool Family_Update(FamilyInfo eInfo);

        [OperationContract]
        bool Family_UpdateEmployee(int EmployeeID);

        [OperationContract]
        bool Family_Delete(int EthnicID);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class FamilyInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        string _Relationship;
        [DataMember]
        public string Relationship
        {
            get { return _Relationship; }
            set { _Relationship = value; }
        }

        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        string _BirthYear;
        [DataMember]
        public string BirthYear
        {
            get { return _BirthYear; }
            set { _BirthYear = value; }
        }
        string _Address;
        [DataMember]
        public string Address
        {
            get { return _Address; }
            set { _Address = value; }
        }
        string _Occupation;
        [DataMember]
        public string Occupation
        {
            get { return _Occupation; }
            set { _Occupation = value; }
        }
        bool  _IsDependent;
        [DataMember]
        public bool IsDependent
        {
            get { return _IsDependent; }
            set { _IsDependent = value; }
        }
        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
    }

}
